// src/api/adminsService.js
import http from '@/utils/http';

// 获取管理员列表
export const fetchAdminData = async () => {
  try {
    const response = await http.get('/admins');
    return response; // 假设返回的数据格式为 { data: [{ id, username }, ...] }
  } catch (error) {
    console.error('Error fetching admin data:', error);
    throw error;
  }
};